package main

import "fmt"

func main() {
	total := 0.0
	rewardCount := 50.0
	blockInterval := 21
	reduceCount := 0
	for rewardCount > 0 {
		sum := float64(blockInterval) * rewardCount
		rewardCount *= 0.5
		total += sum
		reduceCount++
	}
	fmt.Println("衰减的次数为：", reduceCount)
	fmt.Println("比特币的总量为：", total)
}
